using System;
using System.Data;
using System.Collections;
using APP.QUANLY.Common;

namespace RMAS.DAL
{
    /// <summary>
    /// Summary description for QT_ITEMINOUT.
    /// </summary>
    public class QT_ITEMINOUT
    {
              private Int32 _ItemID;
      private string _ItemName;
      private string _ItemType;
      private string _ItemObject;
      private string _ItemNotes;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
	      public bool IsSetItemID; 
      public bool IsItemIDNullable   
      { 
	 get { return false;  } 
      }
      public Int32 ItemID
      {
         get { return _ItemID; }
         set 
	    { 
 		 _ItemID = value;
		IsSetItemID = true;
 	    }
      }
    public bool IsSetItemName; 
    public bool IsItemNameNullable   
    { 
		get { return false;  } 
    }
    public string ItemName
    {
        get{ return _ItemName;  }
        set
		{
			_ItemName = value;
			IsSetItemName = true;
		}
    }
    public bool IsSetItemType; 
    public bool IsItemTypeNullable   
    { 
		get { return false;  } 
    }
    public string ItemType
    {
        get{ return _ItemType;  }
        set
		{
			_ItemType = value;
			IsSetItemType = true;
		}
    }
    public bool IsSetItemObject; 
    public bool IsItemObjectNullable   
    { 
		get { return false;  } 
    }
    public string ItemObject
    {
        get{ return _ItemObject;  }
        set
		{
			_ItemObject = value;
			IsSetItemObject = true;
		}
    }
    public bool IsSetItemNotes; 
    public bool IsItemNotesNullable   
    { 
		get { return false;  } 
    }
    public string ItemNotes
    {
        get{ return _ItemNotes;  }
        set
		{
			_ItemNotes = value;
			IsSetItemNotes = true;
		}
    }

        #endregion

        #region Constructors
        public QT_ITEMINOUT()
        {
            Reset();
        }
        public QT_ITEMINOUT(QT_ITEMINOUT obj)
        {
            	this._ItemID = obj.ItemID;
	this._ItemName = obj.ItemName;
	this._ItemType = obj.ItemType;
	this._ItemObject = obj.ItemObject;
	this._ItemNotes = obj.ItemNotes;
        }
        #endregion

        public void Reset()
        {
                     _ItemID = EmptyValues.v_Int32;
         _ItemName = EmptyValues.v_string;
         _ItemType = EmptyValues.v_string;
         _ItemObject = EmptyValues.v_string;
         _ItemNotes = EmptyValues.v_string;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["ItemID"] is DBNull))
		{
			obj.ItemID = (Int32)reader["ItemID"];
		}
                if(!(reader["ItemName"] is DBNull))
		{
			obj.ItemName = (string)reader["ItemName"];
		}
                if(!(reader["ItemType"] is DBNull))
		{
			obj.ItemType = (string)reader["ItemType"];
		}
                if(!(reader["ItemObject"] is DBNull))
		{
			obj.ItemObject = (string)reader["ItemObject"];
		}
                if(!(reader["ItemNotes"] is DBNull))
		{
			obj.ItemNotes = (string)reader["ItemNotes"];
		}
//            _ItemID = (reader["ItemID"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["ItemID"];
//            _ItemName = (reader["ItemName"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["ItemName"];
//            _ItemType = (reader["ItemType"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["ItemType"];
//            _ItemObject = (reader["ItemObject"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["ItemObject"];
//            _ItemNotes = (reader["ItemNotes"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["ItemNotes"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(Int32 ItemID, string ItemName, string ItemType, string ItemObject, string ItemNotes)
        {
                     this._ItemID = ItemID;
         this._ItemName = ItemName;
         this._ItemType = ItemType;
         this._ItemObject = ItemObject;
         this._ItemNotes = ItemNotes;
        }
    }
}